<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title></title>
    <link id="s_styleThemes" rel="stylesheet" type="text/css" href="../static/jquery-easyui-1.5/themes/gray/easyui.css">
    <link rel="stylesheet" type="text/css" href="../static/jquery-easyui-1.5/themes/icon.css">
    <link rel="stylesheet" type="text/css" href="../static/jquery-easyui-1.5/themes/color.css">
    <link rel="stylesheet" type="text/css" href="../static/font-awesome-4.7.0/css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css" href="../static/common.css">
    <script type="text/javascript" src="../static/jquery-easyui-1.5/jquery.min.js"></script>
    <script type="text/javascript" src="../static/jquery-easyui-1.5/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="../static/jquery-easyui-1.5/locale/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript" src="../static/jquery/jquery.form.js" type="text/javascript"></script>
    <script type="text/javascript" src="../static/artTemplate/template-debug.js"></script>
    <script type="text/javascript" src="../static/layer/layer.js"></script>
    <script type="text/javascript" src="../static/server.js"></script>
    <script type="text/javascript" src="../static/common.js"></script>
    <script type="text/javascript" src="../static/head.js"></script>
    <script type="text/javascript" src="../static/My97DatePicker/WdatePicker.js"></script>
    <script type="text/javascript" src="../static/jquery/jquery.md5.js"></script>
    <style type="text/css">
        textarea:focus, input[type="text"]:focus, input[type="password"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="date"]:focus, input[type="month"]:focus, input[type="time"]:focus, input[type="week"]:focus, input[type="number"]:focus, input[type="email"]:focus, input[type="url"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="color"]:focus, select:focus {
            border-color: rgba(53, 152, 220, 0.8);
            outline: 0;
            outline: thin dotted \9;
            background-color: #dfe2eb;
            -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
            -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
            box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
        }
    </style>
    <script type="text/javascript">
        var menuId = getUrlParam("menuId");
        var menuCode = getUrlParam("menuCode");
        var menuName = getUrlParam("menuName");
        var url = getUrlParam("url");
        var authFlag = getUrlParam("authFlag");
        var authArray = undefined;
        var easyuiload = true;
        var UEDITOR_HOME_URL = "../static/ueditor/";//百度地图控件地址
        if(parent != undefined && parent.fy_api != undefined){
            fy_api.loginUser = parent.fy_api.loginUser;
        }
        $(function () {
            $("title").html(menuName);
            if (url != "") {
                url += (url.indexOf("?") == -1 ? "?" : "&") + "_t=" + new Date().getTime();
                if (url.indexOf("http") == 0) {
                    //外部页面
                    $("body").height($(window).height()).append('<iframe frameborder="0" scrolling="auto" style="width:100%;height:100%;" src="' + url + '"></iframe>');
                } else {
                    //内部页面
                    showLoading();
                    $("body").load(url, undefined,
                        function () {
                            //load完成
                            if(easyuiload){
                                //需要加载easyui
                                $.parser.parse($("body"));
                                page_loaded();
                            }
                            if(authFlag != "1" && menuCode != ""){
                                //需要加载权限
                                fy_api.ajax({
                                    url: "shiroPermission/getRolePermission.do",
                                    data: {"menuCode": menuCode},
                                    success: function(data){
                                        authArray = new Array();
                                        if(data != null){
                                            var authButton = $("a.auth-button");
                                            for(var i = 0; i < data.length; i++){
                                                var authCode = data[i].replace(menuCode + ":","");
                                                authButton.filter("[action='" + authCode + "']").css("display","inline-block");
                                                authArray.push(authCode);
                                            }
                                            for(var i=0;i<_list_grid.length;i++){
                                                var grid = _list_grid[i].grid;
                                                var options = grid.datagrid("options");
                                                if(options.__context_handle != undefined){
                                                    var handles = new Array();
                                                    for(var i = 0;i < options.__context_handle.length; i++){
                                                        var handle = options.__context_handle[i];
                                                        if(handle.auth == undefined || auth_validate(handle.auth) == 1){
                                                            //存在权限
                                                            handles.push(handle);
                                                        }
                                                    }
                                                    if(options._menu != undefined){
                                                        options._menu.remove();
                                                        options._menu = undefined;
                                                    }
                                                    options._context_handle = handles;
                                                    options.__context_handle = undefined;
                                                }
                                            }
                                        }
                                    }
                                })
                            }
                        }
                    );
                }
            }
        })
    </script>
</head>
<body>
</body>
</html>